<?php
namespace Admin\Controller;
use Think\Controller;
class CommonController extends Controller {
    public function _initialize()
    {
		//判断session是否存在
		if(empty($_SESSION['admin_user_info'])){
			//跳转到 登陆页
			$this->redirect("Public/login");
		}


		$c_name = CONTROLLER_NAME;
        $a_name = ACTION_NAME; 

        $node_lists = $_SESSION['admin_user_info']['node_lists'];

        $user_action = $c_name.'_'.$a_name;

        if(in_array($user_action, $node_lists)){
        	
        }else{
        	$this->error('抱歉，您没有权限');
        }
    }
}